package com.hnas.eCard.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hnas.appLogin.dto.search.RegisterAnymonusWsFromServer;
import com.hnas.common.util.PostServerInfoGet;

@Controller
@RequestMapping("/ecard/test")
public class TestController {
	
	@Autowired
	private PostServerInfoGet postServerInfoGet;
	
	@Value("#{component['card_type']}")//发卡类型
	private String cardType;
	
	@Value("#{component['merchant_id']}")//发卡商户id
	private String merchantId;
	
	@Value("#{component['acc_card_password']}")//发卡类型
	private String accCardPassword;

	@RequestMapping("/createcard")
	public void createCard() {
		try {
			RegisterAnymonusWsFromServer cardAcc = (RegisterAnymonusWsFromServer) postServerInfoGet.getCardObj(cardType,merchantId,accCardPassword).getResultData();
			System.out.println(cardAcc.getCard_no());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
